/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __G_EVENT_H__
#define __G_EVENT_H__

#include "NgPrerequisites.h"

namespace PQEngine
{

	

	/*PQEngine even base class.
	All events of the engine should inherit this class
	*/
	class GameEvent           // event base class
	{
	public:
		enum Type
		{
			Unkown=0,//invalid event


			//Add new event type just above THIS LINE!
		};
	public:
		GameEvent(Type type);
		virtual ~GameEvent();
		inline Type type() const{return _type;}

		inline void setAccepted(bool accepted) { _accepted = accepted; }
		inline bool isAccepted() const { return _accepted; }

		inline void accept() { _accepted = true; }
		inline void ignore() { _accepted = false; }

		static int registerEventType(int hint = -1);

	protected:
		Type _type;
	private:
		bool _accepted;
	};
}

#endif
